//
//  JYShopDepositView.m
//  JYFarm
//
//  Created by 花花 on 2017/11/8.
//  Copyright © 2017年 花花. All rights reserved.
//

#import "JYShopDepositView.h"

@implementation JYShopDepositView
- (void)awakeFromNib{

    [super awakeFromNib];
    
    self.bordView.layer.borderWidth = 1;
    self.bordView.layer.borderColor = [UIColor colorWithHexString:@"F2F2F2"].CGColor;


}

- (void)setDataArray:(NSArray *)dataArray{

    _dataArray  = dataArray;

    [self loadData];
}


- (void)loadData{


    for (NSDictionary *dic in self.dataArray) {
        
        self.model = [JYShopDepositObjModel mj_objectWithKeyValues:dic];
        
    }
    [self.imgView sd_setImageWithURL:[NSURL URLWithString:self.model.goodsPictureUrl] placeholderImage:defaultFarmImage];
    
    self.goodsNameLabel.text = self.model.goodsName;
    self.goodsPriceLabel.text = [NSString stringWithFormat:@"￥%.2f",[self.model.goodsPrice doubleValue]];
    self.unitLabel.text = [NSString stringWithFormat:@"/%@", self.model.unit];
    
    
}


@end
